home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1996
/
MacHack 1996.toast
/
Hacks
/
Hacks ’92
/
AshtrayII
/
PigLatinTranslation.r
< prev
next >
Wrap
Text File
|
1992-06-22
|
4KB
|
152 lines
/*
File: SampleFileTranslationExt.r
Contains: Sample resource shell for writing a File Translation Extension.
Copyright: © 1990-1992 by Apple Computer, Inc., all rights reserved.
*/
#include "Types.r"
#include "TranslationExtensions.h"
#include "ExtendedBundleTypes.r"
#define kSignature 'PIGH' /* set this to creator signature of extension */
#define kComponentFileType 'thng' /* 'thng' => ComponentMgr component file */
type 'thng' {
hex longint type;
hex longint subType;
hex longint manufacturer;
hex longint flags;
hex longint flagsMask;
hex longint thingResType;
int thingResID;
hex longint thingNameResType;
int thingNameResID;
hex longint thingInfoResType;
int thingInfoResID;
hex longint thingIconResType;
int thingIconResID;
};
resource 'thng' (128, locked) {
'xlat', /* all Translation Extensions have type = 'xlat' */
'file', /* 'file' or 'scrp' */
kSignature, /* manufacturer should be same as creator signature */
kFileTranslationExtensionAPIversion,/* api version is 1 */
0, /* mask is ignored and should be 0 */
'xlat',128, /* code resource */
'STR ',128, /* name string */
'STR ',129, /* information string */
'ICON',128 /* extension icon */
};
Include "PigLatinTranslation.rsrc"; // get 'xlat' code
resource 'STR ' (128, purgeable) {
"Pig Latin Translation"
};
resource 'STR ' (129, purgeable) {
"This translates to and from Pig Latin. "
"Put it in the extension folder to make it work. "
};
resource 'ICON' (128, purgeable) {
$"7FFF FFF0 8000 0008 8000 0008 8000 0008"
$"8000 0008 8000 0008 8000 0008 8000 0008"
$"A000 0008 D000 000A 9000 000D 1000 0009"
$"1000 0001 1000 0001 1000 0001 1000 0001"
$"1000 0001 1000 0001 1000 0001 1000 0001"
$"1000 0009 9000 000D D000 000A A000 0008"
$"8000 0008 8000 0008 8000 0008 8000 0008"
$"8000 0008 8000 0008 8000 0008 7FFF FFF0",
};
data 'PICT' (150) {
$"0094 FFFF FFFF 002B 009B 1101 A000 82A1" /* .î.....+.õ..†.Ç° */
$"0096 000C 0200 0000 0200 0000 0000 0000" /* .ñ.............. */
$"A100 9A00 0800 0B00 0000 3200 0001 000A" /* °.ö.......2..... */
$"0000 0000 002A 009A 2C00 0C00 1509 4865" /* .....*.ö,....ΔHe */
$"6C76 6574 6963 6103 0015 0D00 0C2E 0004" /* lvetica...¬..... */
$"0000 0100 2B1B 0A15 5069 6720 4C61 7469" /* ....+...Pig Lati */
$"6E20 7472 616E 736C 6174 6F72 0D2B 080E" /* n translator¬+.. */
$"1162 7920 4E69 636B 204B 6C65 647A 696B" /* .by Nick Kledzik */
$"200D 2B11 0E07 4D61 6348 6163 6BA0 0097" /* ¬+...MacHack†.ó */
$"A000 83FF" /* †.É. */
};
resource 'BNDL' (128) {
'PIGH',
0,
{ /* array TypeArray: 2 elements */
/* [1] */
'ICN#',
{ /* array IDArray: 5 elements */
/* [1] */
0, 128,
},
/* [2] */
'FREF',
{ /* array IDArray: 5 elements */
/* [1] */
0, 128,
}
}
};
resource 'FREF' (128) {
'thng',
0,
""
};
resource 'ICN#' (128, purgeable) {
{ /* array: 2 elements */
/* [1] */
$"7FFF FFF0 8000 0008 8000 0008 8000 0008"
$"8000 0008 8000 0008 8000 0008 8000 0008"
$"A000 0008 D000 000A 9000 000D 1000 0009"
$"1000 0001 1000 0001 1000 0001 1000 0001"
$"1000 0001 1000 0001 1000 0001 1000 0001"
$"1000 0009 9000 000D D000 000A A000 0008"
$"8000 0008 8000 0008 8000 0008 8000 0008"
$"8000 0008 8000 0008 8000 0008 7FFF FFF0",
/* [2] */
$"7FFF FFF0 FFFF FFF8 FFFF FFF8 FFFF FFF8"
$"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
$"FFFF FFF8 DFFF FFFA 9FFF FFFF 1FFF FFFF"
$"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
$"1FFF FFFF 1FFF FFFF 1FFF FFFF 1FFF FFFF"
$"1FFF FFFF 9FFF FFFF DFFF FFFA FFFF FFF8"
$"FFFF FFF8 FFFF FFF8 FFFF FFF8 FFFF FFF8"
$"FFFF FFF8 FFFF FFF8 FFFF FFF8 7FFF FFF0"
}
};
resource 'kind' (128)
{
'PIGH',
verUS,
{
'PIGL', "Pig Latin document",
'TEXT', "Pig Latin document",
}
};